package com.ruoyi.system.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.vo.SelfServiceTerminalSettingsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SelfServiceTerminalSettingsMapper;
import com.ruoyi.system.domain.SelfServiceTerminalSettings;
import com.ruoyi.system.service.ISelfServiceTerminalSettingsService;

/**
 * 自助终端机设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class SelfServiceTerminalSettingsServiceImpl extends ServiceImpl<SelfServiceTerminalSettingsMapper, SelfServiceTerminalSettings>  implements ISelfServiceTerminalSettingsService
{
    @Autowired
    private SelfServiceTerminalSettingsMapper selfServiceTerminalSettingsMapper;

    /**
     * 通过id查询自助终端机设置
     *
     * @param id 自助终端机设置主键
     * @return 自助终端机设置
     */
    @Override
    public SelfServiceTerminalSettingsVO selectSelfServiceTerminalSettingsById(Long id)
    {
        return selfServiceTerminalSettingsMapper.selectSelfServiceTerminalSettingsById(id);
    }

    /**
     * 查询自助终端机设置列表
     *
     * @param selfServiceTerminalSettings 自助终端机设置
     * @return 自助终端机设置
     */
    @Override
    public List<SelfServiceTerminalSettingsVO> selectSelfServiceTerminalSettingsList(SelfServiceTerminalSettingsVO selfServiceTerminalSettings)
    {
        return selfServiceTerminalSettingsMapper.selectSelfServiceTerminalSettingsList(selfServiceTerminalSettings);
    }

    /**
     * 新增自助终端机设置
     *
     * @param selfServiceTerminalSettings 自助终端机设置
     * @return 结果
     */
    @Override
    public int insertSelfServiceTerminalSettings(SelfServiceTerminalSettingsVO selfServiceTerminalSettings)
    {
        return selfServiceTerminalSettingsMapper.insertSelfServiceTerminalSettings(selfServiceTerminalSettings);
    }

    /**
     *
     *
     *
     * 修改自助终端机设置
     *
     * @param selfServiceTerminalSettings 自助终端机设置
     * @return 结果
     */
    @Override
    public int updateSelfServiceTerminalSettings(SelfServiceTerminalSettingsVO selfServiceTerminalSettings)
    {
        return selfServiceTerminalSettingsMapper.updateSelfServiceTerminalSettings(selfServiceTerminalSettings);
    }

    /**
     * 通过id批量删除自助终端机设置信息
     *
     * @param ids 需要删除的自助终端机设置主键
     * @return 结果
     */
    @Override
    public int deleteSelfServiceTerminalSettingsByIds(Long[] ids)
    {
        return selfServiceTerminalSettingsMapper.deleteSelfServiceTerminalSettingsByIds(ids);
    }

    /**
     * 通过id删除自助终端机设置信息
     *
     * @param id 自助终端机设置主键
     * @return 结果
     */
    @Override
    public int deleteSelfServiceTerminalSettingsById(Long id)
    {
        return selfServiceTerminalSettingsMapper.deleteSelfServiceTerminalSettingsById(id);
    }

    /**
     * 获取自助终端机设置详情
     *
     * @param storeId 门店id
     * @return 结果
     */
    @Override
    public SelfServiceTerminalSettingsVO selectByStoreId(Long storeId) {
        return selfServiceTerminalSettingsMapper.selectByStoreId(storeId);
    }
}
